\ProvidesPackage{beamerthemeSMS2011} % this style was created by David Vilar

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\selectcolormodel{cmyk}
\selectcolormodel{gray}
\mode<presentation>

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% custom colors
\definecolor{i6blue}{cmyk}{1,0.305,0,0.06}
\definecolor{i6bluedark}{rgb}{0.0156,0.2578,0.5625} 
% http://www.colorsontheweb.com/colorwizard.asp#wizard, used start set: #0066cc
%\definecolor{i6colorscheme1}{HTML}{FF6518}  % e.g. for block title
\definecolor{i6colorscheme1}{HTML}{000000} % for block title
\definecolor{i6colorblockbg}{HTML}{0033cc}
\definecolor{i6colorblockfg}{HTML}{FCE94F}
\definecolor{i6colorscheme2}{HTML}{000000}  % e.g. title in headline
%\definecolor{i6colorscheme3}{HTML}{C3DFFF}  % e.g. for poster background
\definecolor{i6colorscheme3}{HTML}{FFFFFF}
\definecolor{i6colorscheme4}{HTML}{000000} 
%\definecolor{i6colorschemeHeadline}{HTML}{0033cc}  % for headline bg
\definecolor{i6colorschemeHeadline}{HTML}{FFFFFF} %for headline bg
\definecolor{i6colorschemeFootline}{HTML}{000000}  % for Footbg
\definecolor{i6colorschemeFootline}{HTML}{100D09}  % for headline bg

% Set bibitem
\setbeamertemplate{bibliography item}[text]

% headline colors and fonts
\setbeamercolor{headline}{fg=black,bg=white}
\setbeamercolor{title in headline}{fg=black}
\setbeamercolor{author in headline}{fg=gray}
\setbeamercolor{institute in headline}{fg=gray}
\setbeamercolor{logo in headline}{fg=black,bg=gray}
\setbeamercolor{separation line}{bg=gray}

% footline colors and fonts
\setbeamercolor{footline}{fg=gray,bg=white}
\setbeamerfont{footline}{fg=gray, size=\normalsize}

% body colors and fonts
\setbeamercolor*{normal text}{fg=black,bg=i6colorscheme3}

% block environment
\setbeamercolor*{block body}{bg=white,fg=black}
\setbeamercolor*{block title}{fg=white,bg=gray}
\setbeamerfont{block title}{size=\large,series=\bf}

% example environment
\setbeamercolor*{example title}{fg=white,bg=i6colorscheme1}
\setbeamerfont{example title}{size=\large,series=\bf,bg=i6colorscheme1,fg=white}


%\setbeamercolor*{example body}{fg=white,bg=i6colorscheme4}
%\setbeamercolor*{example title}{fg=white,bg=i6colorscheme1}


%  \setbeamercolor{framesubtitle}{fg=ta3orange, bg=ta2gray}
%  \setbeamercolor{author in head/foot}{fg=tabutter, bg=black}
%  \setbeamercolor{title in head/foot}{bg=tabutter, fg=black}


\setbeamercolor{alerted text}{fg=i6colorscheme1}
%\setbeamercolor{structure}{fg=i6blue}

%  \setbeamertemplate{itemize/enumerate body begin}{
%  }
%  \setbeamertemplate{itemize/enumerate body end}{
%  }

\setbeamertemplate{itemize items}[triangle]
\setbeamertemplate{navigation symbols}{}  % no navigation on a poster

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setbeamertemplate{block begin}{
  \vskip.75ex
  \begin{beamercolorbox}[leftskip=1cm,colsep*=.75ex]{block title}%
    \usebeamerfont*{block title}\insertblocktitle
  \end{beamercolorbox}%
  {\ifbeamercolorempty[bg]{block body}{}{\nointerlineskip\vskip-0.5pt}}%
  \usebeamerfont{block body}%
  \begin{beamercolorbox}[colsep*=.75ex,sep=.75ex,vmode]{block body}%
    \ifbeamercolorempty[bg]{block body}{\vskip-.25ex}{\vskip-.75ex}\vbox{}%
  }
  \setbeamertemplate{block end}{
  \end{beamercolorbox}
}

%\setlength{\headsep}{-10ex}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setbeamertemplate{headline}{  
  \leavevmode
  \vskip1ex
  \begin{beamercolorbox}[wd=\paperwidth]{headline}
      \begin{minipage}[b]{.23\paperwidth}
        \mbox{}
      \end{minipage}
      \begin{minipage}[b][4.5cm][b]{0.5\paperwidth}
        \begin{center}
          \usebeamercolor{title in headline}{\color{fg}\textbf{\LARGE{\inserttitle}}\\[1ex]}
          \usebeamercolor{author in headline}{\color{fg}\large{\insertauthor}\\[1ex]}
          \usebeamercolor{institute in headline}{\color{fg}\large{\insertinstitute}\\[1ex]}     
        \end{center}
      \end{minipage}
      \begin{minipage}[b][4.5cm][b]{.23\paperwidth}
        \vfill
        \begin{center}
          \includegraphics[width=.65\linewidth]{NUS_logo_keyline.pdf}
        \end{center}
      \end{minipage}
    \end{beamercolorbox}
  %  \vskip1ex
 %   \begin{beamercolorbox}[wd=\paperwidth]{lower separation line head}
 %     \rule{0pt}{2pt}
 %   \end{beamercolorbox}
  }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setbeamertemplate{footline}{
  \begin{beamercolorbox}[wd=\paperwidth]{upper separation line foot}
    \rule{0pt}{2pt}
  \end{beamercolorbox}
  
  \begin{beamercolorbox}[ht=4ex,leftskip=1cm,rightskip=1cm]{footline}%
    Department of Mathematics - National University of Singapore \hfill Mail: \texttt{g0701232@nus.edu.sg}
    \vskip1ex
  \end{beamercolorbox}

  \begin{beamercolorbox}[wd=\paperwidth]{lower separation line foot}
    \rule{0pt}{2pt}
  \end{beamercolorbox}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\mode<all>

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Local Variables: 
%%% mode: latex
%%% TeX-master: "poster"
%%% TeX-PDF-mode: t
%%% End: 
